<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script type="text/javascript">
        //事件委托：利用事件冒泡，和事件源对象进行处理
        var li = document.getElementByTagName('li');
        var len = li.length;
        for(var i = 0 ; i<len; i++){
        li[i].onclick = ()=>{
		console.log(this.innerText)
            }
        }
    </script>
</body>
</html>